import request from '@/utils/request'

// 查询验收入库列表
export function listStockin(query) {
  return request({
    url: '/equ/stockin/list',
    method: 'get',
    params: query
  })
}
// 查询验收入库列表
export function listStockinVo(query) {
  return request({
    url: '/equ/stockin/listVo',
    method: 'get',
    params: query
  })
}
// 查询验收入库详细
export function getStockin(stockId) {
  return request({
    url: '/equ/stockin/' + stockId,
    method: 'get'
  })
}

// 新增验收入库
export function addStockin(data) {
  return request({
    url: '/equ/stockin',
    method: 'post',
    data: data
  })
}

// 修改验收入库
export function updateStockin(data) {
  return request({
    url: '/equ/stockin',
    method: 'put',
    data: data
  })
}

// 删除验收入库
export function delStockin(stockId) {
  return request({
    url: '/equ/stockin/' + stockId,
    method: 'delete'
  })
}

// 获取报废记录列表
export function listStockins(assetId) {
  return request({
    url: '/equ/stockin/getStockinByAssetId/' + assetId,
    method: 'get'
  })
}
